<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body style="font-family:Arial, Helvetica, sans-serif">
<h1>Add More Color <br />
</h1>
<form id="form1" name="form1" method="post" action="">
  <label for="barcode"></label>
  <table width="900" border="1" cellspacing="0" cellpadding="10">
    <tr>
      <th scope="col">Input Full Barcode: 
        <input type="text" name="barcode" id="barcode" />
        <br />
        The Barcode do not have contain color code 
        <input name="no_color" type="checkbox" id="no_color" value="1" />
        <label for="no_color"></label></th>
      <th style="text-align:left; padding-left:20px;">
      <?php
      foreach($this->cList as $kc => $vc){
		?>  
	<input name="color[]" type="checkbox" value="<?php echo  $vc['id_color']?>" id="color" /><?php echo $vc['des_color']?><br/>
	<?php	  
		  }
      ?>  
      </th>
      <th scope="col"><input type="submit" name="btn_gen" id="btn_gen" value="Generate" /></th>
    </tr>
  </table>
</form>

<h1>Result
</h1>
<form id="form3" name="form3" method="post" action="">
  <table width="1000" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <th scope="col" style="width:250px;" >Barcode</th>
    <th scope="col">Description (Color Replacement is Case Sensitive!!)</th>
    <th scope="col" style="width:80px;">Select</th>
  </tr>
  <?php 
  if(!empty($this->arrChoice)){
  foreach($this->arrChoice as $colorID => $v){?>
  <tr>
    <td>
      <input type="text" name="barcode[<?php echo $colorID?>]" id="barcode[<?php echo $colorID?>]" value="<?php echo $this->arrCode[$colorID]?>" readonly="readonly" />
</td>
    <td>
      <input type="text" name="des[<?php echo $colorID?>]" id="des[<?php echo $colorID?>]" style="width:90%" value="<?php echo $this->arrDes[$colorID]?>" />
</td>
    <td align="center">
    <?php if(!$v){?>
    <input type="checkbox" name="choose[<?php echo $colorID?>]" id="choose[<?php echo $colorID?>]" <?php echo $this->arrChoice[$colorID]?> checked="checked" />
    <?php }
	else{
		echo "<b>Exist!</b>";
		}
	?>  
</td>
  </tr>
 <?php } }?> 
  
  
<tr>
  <td colspan="3" align="center">Country:
    <label for="country"></label>
    <input type="text" name="country" id="country" />
    (Capital Letter CHINA/AUSTRALIA/KOREA)</td></tr>
<tr>
  <td colspan="3" align="center"><input type="submit" name="btn_save" id="btn_save" value="SAVE SELECTED" /></td>
</tr>  
</table>
  </form>
</body>
</html>
